<%-- 
    Document   : login
    Created on : 16-ago-2011, 16.58.06
    Author     : smag
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
   
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Login Page</title>
        <link href="style-login2.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    <div id="container">
    <div class="div-manager">
       <form action="LoginServlet" method="POST">
          <div class="div-insert-name">
            <h3>Insert username and password </h3>
            <table>
            <tr>
               <td width="61"> Username </td>
               <td width="177"> <input type="text" size="16" name="username"></td>
            </tr>
            <tr>
               <td> Password </td>
               <td><input type="password" size="16" name="password"></td>
            </tr>
            </table> <br>
              <input type="submit" value="Login" style="margin-top: 10; margin-left: 30"> <br>
            	<%  if(request.getAttribute("Error") != null) {
						String error = (String) request.getAttribute("Error"); 
						if(error!="null") %>
            	<font size="3" color="red" > &nbsp <%= error %></font> <% } %>
         </div>
       </form>
        

        <form action="RegisterServlet" method="POST">
           <div class="div-register">
            <h3> Register </h3>
            <table>
            <tr>
                <td width="61"> Username </td>
                <td width="177"> <input type="text" size="14" name="username"></td>
            </tr>
            <tr>
                <td> Password </td>
                <td> <input type="password" size="14" name="password"></td>
            </tr>
            <tr>
                <td> e-mail </td>
                <td> <input type="text" size="14" name="email"></td>
            </tr>
            </table>
            <br> <input type="submit" value="Register" style="margin-top:10; margin-left:30"> <br>
            	<%  if(request.getAttribute("Reg") != null) {
						String reg = (String) request.getAttribute("Reg"); 
						if(reg!="null") %>
            	<font size="3" color="red" > &nbsp <%= reg %></font> <% } %>
           </div>
       </form>
     </div>
    </div>
    </body>
</html>
